package com.woniu.his.mms.client;


import com.woniu.his.mms.client.param.CreateMedicineParam;
import com.woniu.his.mms.client.result.DmsMedicineItemRecordResult;
import com.woniu.his.mms.client.result.MedicinePrescriptionReuslt;
import com.woniu.his.mms.client.result.MedicineResult;
import com.woniu.his.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @version: java version 1.8
 * @Author: Mr tao
 * @description:
 * @date: 2022-11-28 9:35
 */
@FeignClient(contextId = "medicinePrescriptionRecordClient",name="mms",path="mms")
public interface MedicineClient {


    /**
     * 开立处方
     * @return
     */
    @PostMapping("/applyMedicine")
    public Result applyMedicine(@RequestBody CreateMedicineParam param);


    @GetMapping("/invalid")
    public Result invalid(@RequestParam("id") Long id);

    /**
     * 作废处方
     * @return
     */
    @PutMapping("/invalidMedicine")
    public Result invalidMedicine(@RequestParam("ids") List<Long> ids);

    /**
     * 根据病例id查询药方
     * @return
     */
    @GetMapping("/listByReg")
    public Result<List<MedicineResult>> listByReg(@RequestParam("caseHistoryId") Long caseHistoryId );

    /**
     * 根据药方id查询条目
     * @return
     */
    @GetMapping("/listByIds")
    public Result<List<DmsMedicineItemRecordResult>> listByIds(@RequestParam("ids") List<Long> ids);

    /**
     * 根据账单id查询成药处方
     * @param BillId
     * @return
     */
    @GetMapping("/queryMedicinePrescriptionByBillId")
    Result<MedicinePrescriptionReuslt> queryMedicinePrescriptionByBillId(@RequestParam("BillId") Long BillId);


    /**
     * 支付成功修改状态
     * @param billId
     * @return
     */
    @GetMapping("paySuccess2")
    Result<Boolean> paySuccess(@RequestParam("billId") Long billId);


}
